package com.qk.management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qk.dto.activity.ActivityDTO;
import com.qk.entity.Activity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 *
 * @author blusr
 * @version 1.0
 * @date 2025/10/9 10:08
 */
@Mapper
public interface ActivityMapper extends BaseMapper<Activity> {
    List<Activity> list(ActivityDTO activityDTO);

    int insert(Activity activity);

    @Delete("delete from t_activity where id = #{id}")
    void delete(Integer id);

    @Select("select * from t_activity where id = #{id}")
    Activity selectById(Integer id);

    int updateById(Activity activity);

    @Select("select * from t_activity where channel = #{channel}")
    List<Activity> selectByChannel(Integer channel);
}
